package com.lanou3g.code0416_01;

/**
 * Created by dllo on 18/4/16.
 */
import java.io.Closeable;
import java.io.IOException;

/**
 * If there are no bugs, it was created by Chen FengYao on 2018/4/16;
 * Otherwise, I don't know who created it either
 */

public class IOUtils {
    public static void closeAll(Closeable ... closeables){
        if (closeables == null){
            return;
        }
        for (Closeable closeable : closeables) {
            if (closeable != null) {
                try {
                    closeable.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
